package com.zx.kitchen.index.common.entity;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by Administrator on 2017/3/5.
 */

public class DishesListBean implements Parcelable {

    /**
     * id : 6742
     * cid : 1359
     * name : 鸡心（ハツ）
     * price : 13.00
     * unit : g
     * brand : 国产
     * standard : 500g
     */

    private String id;
    private String cid;
    private String name;
    private String price;
    private String unit;
    private String brand;
    private String standard;
    private boolean isChecked = false;

    public boolean isChecked() {
        return isChecked;
    }

    public void setIsChecked(boolean checked) {
        isChecked = checked;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getCid() {
        return cid;
    }

    public void setCid(String cid) {
        this.cid = cid;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPrice() {
        return price;
    }

    public void setPrice(String price) {
        this.price = price;
    }

    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public String getStandard() {
        return standard;
    }

    public void setStandard(String standard) {
        this.standard = standard;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.id);
        dest.writeString(this.cid);
        dest.writeString(this.name);
        dest.writeString(this.price);
        dest.writeString(this.unit);
        dest.writeString(this.brand);
        dest.writeString(this.standard);
        dest.writeByte(this.isChecked ? (byte) 1 : (byte) 0);
    }

    public DishesListBean() {
    }

    protected DishesListBean(Parcel in) {
        this.id = in.readString();
        this.cid = in.readString();
        this.name = in.readString();
        this.price = in.readString();
        this.unit = in.readString();
        this.brand = in.readString();
        this.standard = in.readString();
        this.isChecked = in.readByte() != 0;
    }

    public static final Parcelable.Creator<DishesListBean> CREATOR = new Parcelable.Creator<DishesListBean>() {
        @Override
        public DishesListBean createFromParcel(Parcel source) {
            return new DishesListBean(source);
        }

        @Override
        public DishesListBean[] newArray(int size) {
            return new DishesListBean[size];
        }
    };
}
